package com.ffyc.cemp.web.controller;

import com.ffyc.cemp.common.dto.HttpResult;
import com.ffyc.cemp.domain.entity.Cinema;
import com.ffyc.cemp.services.service.ICinemaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "电影院api接口")
@RestController
@RequestMapping("/api/cinema")
public class CinemaController {

    @Autowired
    private ICinemaService ics;

    @ApiOperation(value = "findAllCinemas", notes = "查询所有的电影院")
    @GetMapping("/findAllCinemas")
    public HttpResult<List<Cinema>> findAllCinemas() {

        return HttpResult.success(ics.findAllCinemas());
    }


}
